<div id="wrapper-content">       
<?php
    $selected_country=1;
    $selected_cat=1;
    if($animals->num_rows()>0){
        $animal = $animals->row();
        $selected_country = $animal->origine;
        $selected_cat = $animal->catid;
    }
    $selected_country_setting = array(
    'table_name' => 'geo_countries',
    'key_field' => 'id',
    'value_field' => 'name'
    ); 
    $selected_cat_setting = array(
    'table_name' => 'categories',
    'key_field' => 'id',
    'value_field' => 'nomfr',
    'where' =>array('parent >' => 0)
    );
?>
<?php echo form_open_multipart('product/update_animal/'.$animal->id.'/'.$per_page.'/'.$off_set)?>
 <div id="viewactu" align="center"> 
 <div align="center" id="titre_viewactu" >AJOUTER ANIMAL</div>
<table id="formactu" cellpadding="10px" cellspacing="0">
    <tr>
        <td><label for="name">Nom</label></td>
        <td><input type="text" size="50" name="txtAnimalName" value="<?php echo $animal->nom?>"></td>
        <td><?php echo form_error('txtAnimalName');?></td>
    </tr>
    <tr>
        <td><label for="cat">Cat&eacute;gorie</label></td>
        <td><?php echo form_dropdown('categorie',dropdown_data($selected_cat_setting),$selected_cat)?></td>
        <td></td>
    </tr>
    <tr>
        <td><label for="cat">Origine</label></td>
        <td><?php echo form_dropdown('origine',dropdown_data($selected_country_setting),$selected_country)?></td>
        <td></td>
    </tr>
    <tr>
        <td>Prix</td>
        <td><input type="text" size="50" name="txtPrice" value="<?php echo $animal->prix;?>"></td>
        <td><?php echo form_error('txtPrice');?></td>
    </tr>
    <tr>
        <td>Quanti&eacute;</td>
        <td><input type="text" size="50" name="txtQuantity" value="<?php echo $animal->quantite;?>"></td>
        <td><?php echo form_error('txtQuantity');?></td>
    </tr>
    <tr>
        <td>Image</td>
        <td><img border="0" width="100px" height="75px" src="<?php echo base_url().'assets/thumbs/'.$animal->img;?>"/><input type="file" name="userfile" size="20"><?php if(isset($error)) echo $error;?></td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="frDesLink">Description(Francais)</a></td>
        <td colspan="2">
            <div class="fckFrenchEditor" style="display: none;border: 1px solid;">
                <?php
                    $data = array('name' => 'txtFrDes',
                    'id' => 'txtDes',
                    'width' => '400',
                    'height' => '250',
                    'value' => $animal->descriptionfr);
                    echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="enDesLink">Description(Anglais)</a></td>
        <td colspan="2">
            <div class="fckEnglishEditor" style="display: none;border: 1px solid;">
                <?php
                    $data = array('name' => 'txtEnDes',
                    'id' => 'txtDes',
                    'width' => '400',
                    'height' => '250',
                    'value' => $animal->descriptionen);
                    echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="spDesLink">Description(Espagnol)</a></td>
        <td colspan="2">
            <div class="fckSpanishEditor" style="display: none;border: 1px solid;">
                <?php
                    $data = array('name' => 'txtSpDes',
                    'id' => 'txtDes',
                    'width' => '400',
                    'height' => '250',
                    'value' => $animal->descriptiones);
                    echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="germanDesLink">Description(Allemagne)</a></td>
        <td colspan="2">
            <div class="fckGermanEditor" style="display: none;border: 1px solid;">
                <?php
                    $data = array('name' => 'txtGeDes',
                    'id' => 'txtDes',
                    'width' => '400',
                    'height' => '250',
                    'value' => $animal->descriptional);
                    echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="dutchDesLink">Description(Holland)</a></td>
        <td colspan="2">
            <div class="fckDutchEditor" style="display: none;border: 1px solid;">
                <?php
                    $data = array('name' => 'txtDuctchDes',
                    'id' => 'txtDes',
                    'width' => '400',
                    'height' => '250',
                    'value' => $animal->descriptionho);
                    echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
    <td></td>
        <td><input type="submit" name="submit" value="Enregistrer"/a></td>
        </td>
    </tr>

</table>
</form>
</div>
</div>